package com.gdkm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.gdkm.dao.UserDao;
import com.gdkm.po.Page;
import com.gdkm.po.Result;
import com.gdkm.po.Student;
import com.gdkm.po.User;
import com.gdkm.po.UserManagement;
import com.gdkm.service.UserService;

//事物管理器
@EnableTransactionManagement
@Service
public class UserServiceImpl implements UserService {
	@Autowired
	UserDao dao;

	@Override
	public void save(String user_code, String user_name, String user_password, String user_state) {
		// TODO Auto-generated method stub
		dao.save(user_code, user_name, user_password, user_state);
	}

	@Override
	public User get(String user_code) {
		// TODO Auto-generated method stub
		return dao.get(user_code);
	}

	@Override
	public void delete1(int id) {
		// TODO Auto-generated method stub
		dao.delete1(id);
	}

	@Override
	public List<Student> list1(int y, int ge) {
		// TODO Auto-generated method stub
		return dao.list1(y, ge);
	}

	@Override
	public void update(Student stu) {
		// TODO Auto-generated method stub
		dao.update(stu);
	}

	@Override
	public void save1(String usercode, String password, String name, String age, String grade, String phoneNumber,
			String sex, String type) {
		// TODO Auto-generated method stub
		dao.save1(usercode, password, name, age, grade, phoneNumber, sex, type);

	}

	@Override
	public List<Student> list(String name, String grade, String type, int y, int ge) {
		// TODO Auto-generated method stub
		return dao.list(name, grade, type, y, ge);
	}

	@Override
	public List<User> gettest(String user_code) {
		// TODO Auto-generated method stub
		return dao.gettest(user_code);
	}

	@Override
	public Student get1(String usercode) {
		// TODO Auto-generated method stub
		return dao.get1(usercode);
	}

	@Override
	public void save2(String usercode, String password,String name) {
		// TODO Auto-generated method stub
		dao.save2(usercode, password,name);
	}

	@Override
	public List<Student> list8(String usercode) {
		// TODO Auto-generated method stub
		return dao.list8(usercode);
	}

	@Override
	public UserManagement findUsercode1(String usercode) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Student findUsercode(String usercode) {
		// TODO Auto-generated method stub
		return dao.findByUsercode(usercode);
	}

}
